package pages;

import org.openqa.selenium.By;
import utils.Log4Test;
import utils.WebDriverWrapper;

/**
 * Created by Vadim on 6/10/14.
 */
public class OutDoorsPage extends BasePage {
    private static final String URL_OUTDOORS = "http://rozetka.com.ua/outdoorsman/c81202/";
    private static final By pageOutDoors = By.xpath("//*[@id='outdoorsman']/div/a");

    public OutDoorsPage(WebDriverWrapper driver) {
        super(driver, URL_OUTDOORS);
    }

    public void open() {
        driver.findElement(pageOutDoors).click();
        if(driver.getCurrentUrl().equals(URL_OUTDOORS)) {
            Log4Test.info("Page outdoors is opened");
        } else {
            Log4Test.error("Page outdoors isn't opened");
        }
    }
}
